package practice;

import java.util.Scanner;

public class SequenceSum {
    public static void main(String[] args) {
        SquenceSum();
    }
    public static void SquenceSum() {
        Scanner sc = new Scanner(System.in);
        int len = sc.nextInt();
        int a = sc.nextInt();
        int sum = 0;
        int k = a;
        for(int i = 1;i <= len;i++){
            sum += a;
            a =a * 10 + k;
        }
        System.out.println(sum);
    }
}
